public class Main {
    public static void main(String[] args) {

        // 测试Dog类
        int age;
        Dog dog = new Dog(5,'公',"中国");
        dog.age = 5;
        dog.sex = '公';
        dog.location = "中国";
        dog.eat(); // 继承自Animal的方法
        dog.sleep(); // 继承自Animal的方法
        dog.shout(); // 重写的方法
        dog.bite();

        // 测试Cat类(推测补充)
        Cat cat = new Cat(2,'M',"中国");
        cat.age = 2;
        cat.sex = 'M';
        cat.eat();
        cat.sleep();
        cat.shout();
    }
}